package com.active.service.enums;
/**
 * www.yiji.com Inc.
 * Copyright (c) 2014 All Rights Reserved.
 */

import java.util.ArrayList;
import java.util.List;



public enum FlowTypeEnum {

	START_EVENT("START_EVENT", "StartEvent"),

	USER_TASK("USER_TASK", "UserTask"),

	END_EVENT("END_EVENT", "UserTask");

	/**
	 * 枚举值
	 */
	private final String code;

	/**
	 * 枚举描述
	 */
	private final String message;

	/**
	 * 构造一个<code>LocalCacheEnum</code>枚举对象
	 *
	 * @param code 枚举值
	 * @param message 枚举描述
	 */
	private FlowTypeEnum(String code, String message) {
		this.code = code;
		this.message = message;
	}
	
	public String getCode() {
		return code;
	}
	
	public String getMessage() {
		return message;
	}
	
	/**
	 * @return Returns the code.
	 */
	public String code() {
		return code;
	}
	
	/**
	 * @return Returns the message.
	 */
	public String message() {
		return message;
	}
	
	/**
	 * 获取全部枚举
	 *
	 * @return List<LocalCacheEnum>
	 */
	public static List<FlowTypeEnum> getAllEnum() {
		List<FlowTypeEnum> list = new ArrayList<>();
		for (FlowTypeEnum each : values()) {
			list.add(each);
		}
		return list;
	}
	
	/**
	 * 获取全部枚举值
	 *
	 * @return List<String>
	 */
	public static List<String> getAllEnumCode() {
		List<String> list = new ArrayList<>();
		for (FlowTypeEnum each : values()) {
			list.add(each.code());
		}
		return list;
	}
}
